using UnityEngine;
using System.Collections;
using System.Collections.Generic;

public class CheckpointManager : MonoBehaviour 
{
	public FlagCheckpointBehavior SelectedCheckpoint;
	
	// Use this for initialization
	void Start () 
	{
	}
	
	// Update is called once per frame
	void Update () 
	{
	
	}
	
	public void setSelectedCheckpoint(FlagCheckpointBehavior cp)
	{
		if(SelectedCheckpoint == cp)
			return;
		
		if(SelectedCheckpoint != null)
			SelectedCheckpoint.Disable();
		
		SelectedCheckpoint = cp;
		SelectedCheckpoint.Enable();
	}
}
